# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openresolv
pkgver=3.12.0
pkgrel=1
pkgdesc="A framework for managing DNS information"
url="https://roy.marples.name/projects/openresolv"
arch="noarch"
license="BSD-2-Clause"
subpackages="$pkgname-doc"
source="http://roy.marples.name/downloads/openresolv/openresolv-$pkgver.tar.xz
	detect_init-remove-irrelevant.patch
	"

build() {
	# NOTE: Don't set --prefix, it should be /.
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--libexecdir=/lib/resolvconf \
		--mandir=/usr/share/man \
		--rundir=/run \
		--sysconfdir=/etc
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
60348ca35114b105c8b3121e5f2d301311fcc7251a9be60c45fedc27267cfd94e413e77c7d5c91d0a0ccb8f1b4288bc147582b0ac9be64afcaa96ad3d833f26f  openresolv-3.12.0.tar.xz
6789cab6a2a22ff6f0fb640a3c1d76449b460605c216c313c1c999f906ab2e2af7d9c63fda55ef394813768fe916d59c50c083bc768528d2819790a173e92c40  detect_init-remove-irrelevant.patch
"
